/*
 *说明：用户凭证申请VASCO令牌脚本
 *
 *@author liuxun 2012-10-27
*/

var opeForm;
var operationType;

$(function(){

	opeForm=$('#opeForm');
	opeForm.url = 'B_USR_CREDENCE!doDynamicToken.do';

	$('#okBtn').click(doOk);
	$('#cancelBtn').click(closeWin);
	
});

//保存按钮操作
function doOk() {

	var validateResult = opeForm.form('validate');
	
//	var auth_mode = $('#auth_mode').val();
//	if(auth_mode != '02'){
//		showInfoWin('令牌不存在,请选择VASCO令牌!');
//		return;
//	}

	if (!validateResult){
		showInfoWin('请正确填写信息!');
		return;
	}

	var options = { 
		url: opeForm.url,
		type: 'post',
		success: function(data){
			showInfoWin('操作成功!', function() {window.close();});
			//getOpenerWin().afterOK();
		}
	};
	opeForm.ajaxSubmit(options);
}
